package top.zuli.package01.class13;

public class ThreadDemo5 extends Thread{
    /*程序入口*//*
    public static void main(String[] args) {
        //创建线程
        Thread thread = new ThreadDemo5("线程1");
        //启动线程
        thread.start();
    }
    @Override
    public void run() {
        System.out.println("子线程名字："+this.getName());
    }

    public ThreadDemo5(String name) {
        super(name);
    }*/

    /*public static void main(String[] args) {
        Thread thread = new ThreadDemo5("线程1");
        thread.start();
    }

    @Override
    public void run() {
        System.out.println("子线程名字："+this.getName());
    }
    public ThreadDemo5(String name){
        super(name);
    }*/

    public static void main(String[] args) {
        Thread thread = new ThreadDemo5("线程1");
        thread.start();
    }

    @Override
    public void run() {
        System.out.println("子线程名字："+this.getName());
    }
    public ThreadDemo5(String name){
        super(name);
    }
}
